// 解析 Number 类

console.log( '- - - - - 用Number构造函数创建实例 - - - - -' );

let x ;

x = new Number( [] ); // 0
console.log( x , typeof x );

x = new Number( {} ); // NaN
console.log( x , typeof x );

x = new Number( '' ); // 0
console.log( x , typeof x );

x = new Number( null ); // 0
console.log( x , typeof x );

x = new Number( undefined ); // NaN
console.log( x , typeof x );

x = new Number( false );
console.log( x , typeof x );

x = new Number( true );
console.log( x , typeof x );

console.log( '- - - - - 将Number构造函数当作普通函数使用 - - - - -' );

let num = Number( '12345' );
console.log( num , typeof num );

num = Number( [] );
console.log( num , typeof num );